From 57ceea07675f295fc5e29ffbb5193ebd26cc1799 Mon Sep 17 00:00:00 2001 From: Robert Lipe Date: Thu, 5 Jul 2018 00:40:24 -0500 Subject: [PATCH] downcast queue_elem to void then up to Waypoint (yes, this is distasteful) --- arcdist.cc | 5 +++-- psitrex.cc | 6 ++++-- tpo.cc | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/arcdist.cc b/arcdist.cc index 9174f4b03..0e2c19ec1 100644 --- a/arcdist.cc +++ b/arcdist.cc @@ -45,9 +45,10 @@ void ArcDistanceFilter::arcdist_arc_disp_wpt_cb(const Waypoint* arcpt2) #if NEWQ foreach (Waypoint* waypointp, waypt_list) { #else - queue* elem, * tmp; + queue* elem, *tmp; QUEUE_FOR_EACH(&waypt_head, elem, tmp) { - Waypoint* waypointp = (Waypoint*) elem; + void* vwaypointp = static_cast(elem); + Waypoint* waypointp = static_cast(vwaypointp); #endif double dist; extra_data* ed; diff --git a/psitrex.cc b/psitrex.cc index eed700e28..0a1d4319f 100644 --- a/psitrex.cc +++ b/psitrex.cc @@ -466,7 +466,8 @@ psit_routehdr_w(gbfile* psit_file, const route_head* rte) unsigned int rte_datapoints = 0; queue *elem, *tmp; QUEUE_FOR_EACH(&rte->waypoint_list, elem, tmp) { - testwpt = (Waypoint*)elem; + void* vwaypointp = static_cast(elem); + Waypoint* testwpt = static_cast(vwaypointp); if (rte_datapoints == 0) { uniqueValue = testwpt->GetCreationTime().toTime_t(); } @@ -612,7 +613,8 @@ psit_trackhdr_w(gbfile* psit_file, const route_head* trk) unsigned int trk_datapoints = 0; QUEUE_FOR_EACH(&trk->waypoint_list, elem, tmp) { if (trk_datapoints == 0) { - Waypoint* testwpt = (Waypoint*)elem; + void* vwaypointp = static_cast(elem); + Waypoint* testwpt = static_cast(vwaypointp); uniqueValue = testwpt->GetCreationTime().toTime_t(); } trk_datapoints++; diff --git a/tpo.cc b/tpo.cc index f3896490b..bab2f3728 100644 --- a/tpo.cc +++ b/tpo.cc @@ -541,6 +541,7 @@ static void tpo_process_tracks() } unsigned char tmp = gbfgetc(tpo_file_in); + Q_UNUSED(tmp); // printf("Skipping unknown byte 0x%x after color\n",tmp); // byte for name length, then name -- 2.30.2